home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / var / lib / dpkg / info / pcmciautils.postinst < prev    next >
Text File  |  2009-03-09  |  1KB  |  56 lines

  1. #! /bin/sh
  2. set -e
  3.  
  4. # Remove a no-longer used conffile
  5. rm_conffile()
  6. {
  7.     CONFFILE="$1"
  8.     ACTION="$2"
  9.  
  10.     if [ "$ACTION" = rename ]; then
  11.         if [ -e "$CONFFILE" ]; then
  12.             echo "Removing obsolete conffile $CONFFILE"
  13.             rm -f "$CONFFILE"
  14.         fi
  15.     elif [ "$ACTION" = remove ]; then
  16.         if [ -e "$CONFFILE".moved-by-preinst ]; then
  17.             rm -f "$CONFFILE".moved-by-preinst
  18.         fi
  19.     fi
  20. }
  21.  
  22. case $1 in
  23.     configure)
  24.         if [ ! -f /etc/pcmcia/config.opts ]; then
  25.             cp -a /usr/lib/pcmciautils/config.opts /etc/pcmcia/
  26.         fi
  27.         if dpkg --compare-versions "$2" lt 010-0ubuntu8; then
  28.             rm_conffile /etc/udev/pcmcia.rules rename
  29.         fi
  30.         if dpkg --compare-versions "$2" lt 014-4ubuntu2; then
  31.             rm_conffile /etc/udev/rules.d/85-pcmcia.rules remove
  32.         fi
  33.         # Ubuntu boot order
  34.         if [ -L /etc/rcS.d/S40pcmciautils ]; then
  35.             mv /etc/rcS.d/S40pcmciautils \
  36.                /etc/rcS.d/S13pcmciautils
  37.         fi
  38.  
  39.         # Remove shutdown and reboot links;
  40.         # this init script does not need them.
  41.         if dpkg --compare-versions "$2" lt "014-1ubuntu2"; then
  42.             rm -f /etc/rc0.d/K88pcmciautils \
  43.                   /etc/rc6.d/K88pcmciautils
  44.         fi
  45.         ;;
  46. esac
  47.  
  48. # Automatically added by dh_installinit
  49. if [ -x "/etc/init.d/pcmciautils" ]; then
  50.     update-rc.d pcmciautils start 13 S . >/dev/null || exit $?
  51. fi
  52. # End automatically added section
  53.  
  54.  
  55. exit 0
  56.